package com.hllxd.hism.star.basic.service.constant.alarm;

/**
 * @author wuguangxi
 * @description
 * @date 2023/4/18 11:46
 **/
public enum HandleStrategyEnum {
    ONE_HOUR("1小时", "1h"),
    SIX_HOUR("6小时", "6h"),
    TWELVE_HOUR("12小时", "12h"),
    ONE_DAY("1天", "1d");

    private final String name;

    private final String code;

    HandleStrategyEnum(String name, String code){
        this.name = name;
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public String getCode() {
        return code;
    }

    public static HandleStrategyEnum getByCode(String code){
        for(HandleStrategyEnum handleStrategyEnum : HandleStrategyEnum.values()){
            if(handleStrategyEnum.getCode().equals(code)){
                return handleStrategyEnum;
            }
        }
        return null;
    }

}
